package com.demo.crm.springboot3security.service;

import java.util.List;
import java.util.Set;

import com.demo.crm.springboot3security.entity.Role;
import com.mybatisflex.core.paginate.Page;

public interface RoleService {
    Role findByName(String name);

    Role save(Role role);

    void delete(Long id);

    Role findById(Long id);
    List<Role> findAll();

    Page<Role> findByPage(int pageNumber, int pageSize);

    boolean existsByName(String name);

    void assignPermissions(Long roleId, Set<Long> permissionIds);
} 